Plot_M <- function (dat=msm1,spp=1,ylim=c(0,1.7)) {
  attach(dat)
  tmp1 <- paste("M1_",spp,sep="")
  tmp2 <- paste("M2_",spp,sep="")
  y=   get(tmp1)
  x=   get(tmp2)
  print(dim(x))
  print(length(x[,1]))
  plot(1979:2010,x[,1]+y[1],ylab="M1 + M2",xlab="Year",ylim=ylim)
  lines(1979:2010,x[,1]+y[1])
  lines(1979:2010,x[,2]+y[2],col="red")
  lines(1979:2010,x[,3]+y[3],col="green")
  lines(1979:2010,x[,4]+y[4],col="blue")
  #lines(1979:2010,dat$M2_1[,3]+dat$M1_1[3],col="blue")
  #lines(1979:2010,dat$M2_1[,5]+dat$M1_1[5],col="green")
  #lines(1979:2010,dat$M2_1[,7]+dat$M1_1[7],col="yellow")
  detach(dat)
}
#  Plot_M(msm3,spp=1)
Plot_Consumed <- function (dat=msm1) {
  attach(dat)
  plot(1979:2010,pollock_consumed/1000,ylim=c(0,8e3),ylab="Pollock consumed (kt)",xlab="Year",type="l",lwd=3,col="red")
  lines(1979:2010,obs_catch_1/1000)
  detach(dat)
}
Plot_Consumed(msm3)
